<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<script type="text/javascript" src="lib/PIE_IE678.js"></script>
<![endif]-->
<link href="css/H-ui.min.css" rel="stylesheet" type="text/css" />
<link href="css/H-ui.admin.css" rel="stylesheet" type="text/css" />
<link href="css/style.css" rel="stylesheet" type="text/css" />
<link href="lib/Hui-iconfont/1.0.7/iconfont.css" rel="stylesheet" type="text/css" />
<!--[if IE 6]>
<script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<title>商品管理</title>
</head>
<body class="pos-r">
<!-- <div class="pos-a" style="width:150px;left:0;top:0; bottom:0; height:100%; border-right:1px solid #e5e5e5; background-color:#f5f5f5">
	<ul id="treeDemo" class="ztree">
	</ul>
</div> -->
<div>
	<nav class="breadcrumb">
		<i class="Hui-iconfont">&#xe67f;</i> <a href="index.html">首页</a> 
		<span class="c-gray en">&gt;</span><a href="circle-list.html"> 商品管理</a> 
		<span class="c-gray en">&gt;</span> 内容列表 
		<a class="btn btn-success radius r mr-20 reload" style="line-height:1.6em;margin-top:3px" href="javascript:;" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a>
		<span class="r" style="margin-top: -2px; box-sizing: border-box;">
			<select name="cid" id="cid" class="select" style="width: auto; height: 31px; vertical-align: middle;">
				<option value="" selected="">全部分类</option>
			</select>
			<input type="text" name="memberid" id="memberid" placeholder="用户id" style="width:100px" class="input-text">
			
			<span style="position:relative">
				<input type="text" name="keywords" id="search-input" placeholder="主题名称" style="width:250px" class="input-text">
				<i class="Hui-iconfont i-close" id="inputclear">&#xe706;</i>
			</span>
			<button name="" id="search" class="btn btn-success"><i class="Hui-iconfont">&#xe665;</i> 搜索</button>
		</span>
	</nav>
	
	<div class="pd-10">
		<table class="table table-border table-bordered table-bg table-hover table-circle">
			<thead>
				<tr class="text-c sort0">
					<th class="valueid"><input name="" type="checkbox" value=""></th>
					<th width="40" class="fun-sort" data-name="goods_id" data-flag="0">ID</th>
					<th width="100">商品名称</th>
					<th >发布者</th>
					<th width="50">分类</th>
					
					<th>主题图片</th>
					<th class="fun-sort" data-name="theme_addtime" data-flag="0">发布时间</th>
					<th >是否上架</th>
					<th >审核状态</th>
					<th width="60">操作</th>
				</tr>
			</thead>
			<tbody id="content_sp">
			  
			</tbody>
		</table>
	</div>

	

	<div class="cl pd-5 bg-1 bk-gray mt-20 mb-20"> 
		<a href="javascript:;" class="btn btn-warning l mr-10 mt-5 radius fun-all" data-type="stop"><i class="Hui-iconfont">&#xe6de;</i> 批量关闭</a> 
		<a href="javascript:;" class="btn btn-success l mr-10 mt-5 radius fun-all" data-type="start"><i class="Hui-iconfont">&#xe603;</i> 批量开启</a> 
		<a href="javascript:;" class="btn btn-danger l mr-10 mt-5 radius fun-all" data-type="del"><i class="Hui-iconfont">&#xe6e2;</i> 批量删除</a> 


		<a href="javascript:;" class="btn btn-warning l mr-10 mt-5 radius fun-all" data-type="indexshow"><i class="Hui-iconfont">&#xe6de;</i> 首页显示</a> 
		<a href="javascript:;" class="btn btn-success l mr-10 mt-5 radius fun-all" data-type="indexhide"><i class="Hui-iconfont">&#xe603;</i> 首页隐藏</a> 
		
		<span class="r pt-5"  style="line-height: 35px;" id="page"></span>
		<span class="r mr-10"  style="line-height: 40px;" id="dataall"></span>  
	</div>


</div>

<!-- 商品列表模版 -->
<script id="test" type="text/html">
  	<% for (x in list) { %>
	<tr class="text-c va-m sort1">
		<td class="valueid"><input name="" type="checkbox" value="<%=list[x].goods_id%>"></td>
		<td><%=list[x].goods_id%></td>
		<td class="text-l"><%=list[x].goods_name%></td>
		<td><a href="/User/user/index.html?id=<%=list[x].member_id%>" target="_blank"><%=list[x].user_name%></a></td>
		<td class="text-l"><a href="/User/Circle/dynamic.html?id=<%=list[x].circle_id%>" target="_blank"><%=list[x].circle_name%></a></td>
		
		<td class="text-l">
		<%if(list[x].theme_type=="link"){%>
			<img class="pic-thumb" src="/Manage/images/blank.gif" data-lazy="<%=list[x].theme_url.img%>">
		<%}else{%>
			<%for (j in list[x].theme_content){%>
			<img class="pic-thumb" src="/Manage/images/blank.gif" data-lazy="<%=list[x].theme_content[j]%>">
			<%}%>
		<%}%>
		</td>
		<td class="text-l"><%=list[x].goods_addtime%></td>
		<td class="td-status">
			<input type="checkbox" class="switch fun-start-stop" style="outline: none;" <%if(list[x].goods_state==1){ %>checked<% } %>/>
		</td>
		<td class="td-indexshow">
			<input type="checkbox" class="switch fun-index-show" style="outline: none;" <%if(list[x].is_index==1){ %>checked<% } %>/>
		</td>
		<td class="td-manage f-18">	 
			<a style="text-decoration:none" class="ml-5 fun-del" href="javascript:;" title="删除"><i class="Hui-iconfont">&#xe6e2;</i></a>
		
		</td>
	</tr>
	<%}%>   
</script>

<script type="text/javascript" src="lib/jquery/1.9.1/jquery.min.js"></script> 
<script type="text/javascript" src="lib/layer/2.1/layer.js"></script>
<script type="text/javascript" src="js/H-ui.js"></script> 
<script type="text/javascript" src="js/H-ui.admin.js"></script> 
<script type="text/javascript" src="js/template-native.js"></script> 
<script type="text/javascript" src="js/s.js"></script> 
<script type="text/javascript" src="lib/laypage/laypage.js"></script> 
<script src="/Manage/js/lazyload.min.js"></script>
<script type="text/javascript">
var API=API_GOODS;
var kk=API_GOODS;


loaddata(API,1,true);





$(document).ready(function(){ 


    

    // 筛选列表
    var gc;
    

    $.getJSON(API_GOODSCLASS,function(data){
    	if(!checkStatus(data)) return;
	
		gc=data;
	    if(data.datas==''){
	    	layer.msg('分类出错', {icon:5,time:1000});
	    }else{
	    	// 罗列一级分类
	    	for(i=0; i<data.datas.length; i++){
	    		$("#cid").append("<option value='"+data.datas[i].gc_id+"' data-flag='"+i+"'>"+data.datas[i].gc_name+"</option>");
	    	}
	    }      
		
    	
    });


	$("#search").click(function(){
		kk=API+"?";
		var param=[
			'k='+encodeURI(document.querySelector('input[name=keywords]').value),
			'cid='+document.querySelector('select[name=cid]').value,
			'uid='+document.querySelector('input[name=memberid]').value,
		];
		kk=kk+param.join('&');
		loaddata(kk,1,true);

	})


})


</script>
</body>
</html>